import java.util.ArrayList;
import java.util.Iterator;
public class ConcreteMediator extends Mediator {

    @Override
    public void componentChanged(Component c) {
        Iterator<Component> iteratorOfComponent= componentsList.iterator();
        Component tempComponent;
        while(iteratorOfComponent.hasNext()){
            tempComponent = iteratorOfComponent.next();
            if(tempComponent!=c){
                tempComponent.update();
            }
        }
    }
}
